﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace FIFP.DashBoard.Model
{
    public class ReducedCapacity : IEquatable<ReducedCapacity>
    {
        public int ScenarioId { get; set; }
        public int PlanId { get; set; }
        public int UnitId { get; set; }
        public int ParentUnitId { get; set; }
        public double OriginalUnitCapacity { get; set; }
        public double ReducedUnitCapacity { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
              
    
        public bool Equals(ReducedCapacity capacity)
        {
            if (PlanId.Equals(capacity.PlanId) && UnitId.Equals(capacity.UnitId) && ParentUnitId.Equals(capacity.ParentUnitId) && StartDate.Equals(capacity.StartDate) && EndDate.Equals(capacity.EndDate))
                return true;
            else
                return false;
        }

        //public override bool Equals(object obj)
        //{
        //    ReducedCapacity capacity = obj as ReducedCapacity;
        //    return UnitId.Equals(capacity.UnitId) && ParentUnitId.Equals(capacity.ParentUnitId) && StartDate.Equals(capacity.StartDate) && EndDate.Equals(capacity.EndDate);
        //}

        //public override int GetHashCode()
        //{
        //    return UnitId.GetHashCode() + ParentUnitId.GetHashCode() + StartDate.GetHashCode() + EndDate.GetHashCode();
        //}
    }
}
